﻿/*
 * Copyright © 2020, Wuxi Safover Intelligent Technology Co., Ltd. All rights reserved.
 * 
 * 无锡安永智能科技有限公司版权所有，未经许可，不得用于商业用途
 * 
 * Visit: https://www.safover.com/ 
 */

using System;
using System.Diagnostics;
using System.Drawing;
using Safover.LidarCollector.Core;

namespace Video.Hik
{
    public class VirtualHikCamera : ICamera
    {
        public bool IsReady
        {
            get { return IsCameraOpen; }
        }

        public CameraStatusChangedEventHandler CameraStatusChanged { get; set; }

        bool IsCameraOpen { get; set; }

        bool IsRecording { get; set; }

        public bool CaptureImage(ImageType imageType, string fileFullName)
        {
            return IsCameraOpen;
        }

        public Image CaptureVideoImage(ImageType imageType, string fileFullName)
        {
            throw new NotImplementedException();
        }

        public bool CloseCamera()
        {
            IsCameraOpen = false;
            Debug.WriteLine("Virtual camera closed.");
            return IsCameraOpen;
        }

        public bool OpenCamera()
        {
            IsCameraOpen = true;
            Debug.WriteLine("Virtual camera opened.");
            return IsCameraOpen;
        }

        public bool StartVideo(IntPtr playWnd)
        {
            IsRecording = true;
            return true;
        }

        public bool StopVideo()
        {
            IsRecording = false;
            return true;
        }
    }
}
